 {include file="public/header" /}
 <style>
     .pas{
        display: none;
     }
 </style>
 <body class="gray-bg">
    <div class="wrapper wrapper-content {:config('adminClass.main')}">
        <div class="row">
            <div class="col-sm-12">
                {include file="public/tophead"}
                {include file="public/top" /}
                <div class="ibox-content">
                {include file="public/topsection"}
                    <form class="form-horizontal" method="post">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">昵称：</label>
                            <div class="col-sm-9">
                                <input name="nickname" type="text" class="form-control" value="{$name.nickname}" maxlength="16" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">密码：</label>
                            <div class="col-sm-9">
                                <button class="btn btn-w-m btn-primary" type="button" id="bpassword" >修改密码</button>
                                <input name="type" type="hidden" class="form-control" value="0" id="membertype">
                            </div>
                        </div>
                        <div class="form-group pas">
                            <label class="col-sm-2 control-label">请输入当前密码：</label>
                            <div class="col-sm-9">
                                <input name="oldpassword" type="password" class="form-control" value="" maxlength="16" >
                            </div>
                        </div>
                        <div class="form-group pas">
                            <label class="col-sm-2 control-label">请您输入新的密码：</label>
                            <div class="col-sm-9">
                                <input name="password" type="password" class="form-control" value="" id="password" maxlength="16">
                            </div>
                        </div>
                        <div class="form-group pas">
                            <label class="col-sm-2 control-label">请再次输入新的密码：</label>
                            <div class="col-sm-9">
                                <input name="repassword" type="password" class="form-control" value="" onchange="checkpwd()" id="repassword" maxlength="16">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div> 
    </div>
{include file="public/footer" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}
<script type="text/javascript">
$(document).ready(function(){
     $(".i-checks").iCheck({
        checkboxClass: "icheckbox_square-green",
        radioClass: "iradio_square-green",
    })
})
$('#bpassword').click(function() {
    $('.pas').css({'display':'block'});
    $('#membertype').val('1');
});
function msg(){
    layer.msg("上传成功")
}
function checkpwd(){
    var p1=$('#password').val();//获取密码框的值
    var p2=$('#repassword').val();//获取重新输入的密码值
    if(p1==""){
        layer.msg("请输入新密码！")
       //检测到密码为空，提醒输入//
        $('#password').focus();//焦点放到密码框
        return false;//退出检测函数
    }//如果允许空密码，可取消这个条件
    if(p1!=p2){
        layer.msg("两次输入密码不一致，请重新输入");
        return false;
    }
}
</script>
{include file="public/bottom" /}